home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / H-I / HypertalkTools.cpt / Script Report 1.2 / card_2885.txt < prev    next >
Text File  |  1989-02-26  |  12KB  |  488 lines

  1. -- card: 2885 from stack: in.2
  2. -- bmap block id: 6487
  3. -- flags: 0000
  4. -- background id: 2742
  5. -- name: Opening Card
  6. ----- HyperTalk script -----
  7. on closeCard
  8.   hide card field "About"
  9.   hide card field "More"
  10.   hide card field "Even More"
  11.   hide button "More"
  12.   hide button "Even More"
  13.   hide button "OK"
  14.   hide card field "Make Button"
  15.   hide button "Script Report"
  16.   show button "About"
  17. end closeCard
  18.  
  19.  
  20.  
  21. -- part 1 (button)
  22. -- low flags: 00
  23. -- high flags: 2000
  24. -- rect: left=162 top=248 right=294 bottom=348
  25. -- title width / last selected line: 0
  26. -- icon id / first selected line: 0 / 0
  27. -- text alignment: 1
  28. -- font id: 0
  29. -- text size: 12
  30. -- style flags: 0
  31. -- line height: 16
  32. -- part name: Begin
  33. ----- HyperTalk script -----
  34. on mouseUp
  35.  
  36.   global pScript
  37.   if hilite of button "Watch the cards go by" is true then
  38.     put true into watch
  39.   else
  40.     put false into watch
  41.   end if
  42.   put space & return into ret
  43.   put empty into field "Script" of card "Script Screen"
  44.   put empty into pScript
  45.   doMenu "Compact Stack"
  46.  
  47.   go next card
  48.   push this card
  49.   get fileName("STAK")
  50.   if it is empty then
  51.     go prev card
  52.     play harpsichord "ee c"
  53.     exit mouseUp
  54.   end if
  55.   set lockMessages to true
  56.   go stack it
  57.   put "Processing the STACK SCRIPT."
  58.   show message box at 21,145
  59.   hide menuBar
  60.   if watch is false then
  61.     set lockScreen to true
  62.   end if
  63.  
  64.   -- PROCESS STACK
  65.   put "SCRIPTS FOR STACK: " & short name of this stack into pScript
  66.   put return & "======================================================" & return & ret after pScript
  67.   put script of this stack into tempScript
  68.   if tempScript is empty then
  69.   else
  70.     put "** STACK SCRIPT ************************************" & return after pScript
  71.     put script of this stack after pScript
  72.     put ret after pScript
  73.   end if
  74.  
  75.   -- PROCESS BACKGROUNDS
  76.   put number of backgrounds into pBack
  77.   repeat with bck = 1 to pBack
  78.     put "Processing BACKGROUND #" & bck && "of" && pBack
  79.     go to background bck
  80.     put script of background bck into tempScript
  81.     if tempScript is empty then
  82.     else
  83.       put "** BACKGROUND #" & bck after pScript
  84.       put the name of background bck into tempName
  85.       if tempName contains "id" then
  86.       else
  87.         put ": " & short name of background bck after pScript
  88.       end if
  89.       put " ************************************" after pScript
  90.       put return after pScript
  91.       put script of background bck after pScript
  92.       put ret after pScript
  93.     end if
  94.  
  95.     -- BACKGROUND FIELDS
  96.     put the number of fields into pField
  97.     repeat with fld = 1 to pField
  98.       put script of field fld into tempScript
  99.       if tempScript is empty then
  100.       else
  101.         put "** BKGND #" & bck & ", FIELD #" & fld after pScript
  102.         put the name of field fld into tempName
  103.         if tempName contains "id" then
  104.         else
  105.           put ": " & short name of field fld after pScript
  106.         end if
  107.         put " ************************************" after pScript
  108.         put return after pScript
  109.         put script of field fld after pScript
  110.         put ret after pScript
  111.       end if
  112.     end repeat
  113.  
  114.     -- BACKGROUND BUTTONS
  115.     put the number of background buttons into pButton
  116.     repeat with btn = 1 to pButton
  117.       put script of background button btn into tempScript
  118.       if tempScript is empty then
  119.       else
  120.         put "** BKGND #" & bck & ", BUTTON #" & btn after pScript
  121.         put the name of background button btn into tempName
  122.         if tempName contains "id" then
  123.         else
  124.           put ": " & short name of background button btn after pScript
  125.         end if
  126.         put " ************************************" after pScript
  127.         put return after pScript
  128.         put script of background button btn after pScript
  129.         put ret after pScript
  130.       end if
  131.     end repeat
  132.  
  133.   end repeat
  134.  
  135.   -- PROCESS CARDS
  136.   put number of cards into pCard
  137.   repeat with crd = 1 to pCard
  138.     put "Processing CARD #" & crd && "of" && pCard
  139.     go to card crd
  140.     put script of card crd into tempScript
  141.     if tempScript is empty then
  142.     else
  143.       put "** CARD #" & crd after pScript
  144.       put the name of card crd into tempName
  145.       if tempName contains "id" then
  146.       else
  147.         put ": " & short name of card crd after pScript
  148.       end if
  149.       put " ************************************" after pScript
  150.       put return after pScript
  151.       put script of card crd after pScript
  152.       put ret after pScript
  153.     end if
  154.  
  155.     -- CARD FIELDS
  156.     put the number of card fields into pField
  157.     repeat with fld = 1 to pField
  158.       put script of card field fld into tempScript
  159.       if tempScript is empty then
  160.       else
  161.         put "** CARD #" & crd & ", FIELD #" & fld after pScript
  162.         put the name of card field fld into tempName
  163.         if tempName contains "id" then
  164.         else
  165.           put ": " & short name of card field fld after pScript
  166.         end if
  167.         put " ************************************" after pScript
  168.         put return after pScript
  169.         put script of card field fld after pScript
  170.         put ret after pScript
  171.       end if
  172.     end repeat
  173.  
  174.     -- CARD BUTTONS
  175.     put the number of buttons into pButton
  176.     repeat with btn = 1 to pButton
  177.       put script of button btn into tempScript
  178.       if tempScript is empty then
  179.       else
  180.         put "** CARD #" & crd & ", BUTTON #" & btn after pScript
  181.         put the name of button btn into tempName
  182.         if tempName contains "id" then
  183.         else
  184.           put ": " & short name of button btn after pScript
  185.         end if
  186.         put " ************************************" after pScript
  187.         put return after pScript
  188.         put script of button btn after pScript
  189.         put ret after pScript
  190.       end if
  191.     end repeat
  192.  
  193.   end repeat
  194.  
  195.   pop card
  196.   go next card
  197.   if watch is false then
  198.     set lockScreen to false
  199.   end if
  200.   hide message box
  201.   show menuBar
  202.   put the number of chars in pScript into numChar
  203.  
  204.   if numChar > 10000 then
  205.  
  206.     put char 1 to 10000 of pScript into field "Script"
  207.     play harpsichord "ee c"
  208.     show card field "Too much"
  209.     show button "OK"
  210.  
  211.   else
  212.  
  213.     put pScript into field "Script"
  214.     play harpsichord "ee c"
  215.     answer "Processing Complete." with "OK"
  216.  
  217.   end if
  218.  
  219. end mouseUp
  220.  
  221.  
  222.  
  223.  
  224. -- part 4 (field)
  225. -- low flags: 01
  226. -- high flags: 2004
  227. -- rect: left=73 top=35 right=238 bottom=444
  228. -- title width / last selected line: 0
  229. -- icon id / first selected line: 0 / 0
  230. -- text alignment: 1
  231. -- font id: 3
  232. -- text size: 18
  233. -- style flags: 0
  234. -- line height: 24
  235. -- part name: 
  236.  
  237.  
  238. -- part 5 (button)
  239. -- low flags: 00
  240. -- high flags: 2000
  241. -- rect: left=448 top=302 right=336 bottom=486
  242. -- title width / last selected line: 0
  243. -- icon id / first selected line: 1011 / 1011
  244. -- text alignment: 1
  245. -- font id: 0
  246. -- text size: 12
  247. -- style flags: 0
  248. -- line height: 16
  249. -- part name: Quit
  250. ----- HyperTalk script -----
  251. on mouseUp
  252.   visual effect dissolve to gray
  253.   visual effect dissolve slowly to gray
  254.   visual effect dissolve to card
  255.   go home
  256. end mouseUp
  257.  
  258.  
  259.  
  260. -- part 7 (button)
  261. -- low flags: 00
  262. -- high flags: 2000
  263. -- rect: left=374 top=47 right=85 bottom=418
  264. -- title width / last selected line: 0
  265. -- icon id / first selected line: 19678 / 19678
  266. -- text alignment: 1
  267. -- font id: 0
  268. -- text size: 12
  269. -- style flags: 0
  270. -- line height: 16
  271. -- part name: About
  272. ----- HyperTalk script -----
  273. on mouseUp
  274.   hide button "About"
  275.   show card field "About"
  276.   show button "More"
  277. end mouseUp
  278.  
  279.  
  280.  
  281. -- part 8 (field)
  282. -- low flags: 81
  283. -- high flags: 2002
  284. -- rect: left=73 top=108 right=236 bottom=442
  285. -- title width / last selected line: 0
  286. -- icon id / first selected line: 0 / 0
  287. -- text alignment: 1
  288. -- font id: 3
  289. -- text size: 14
  290. -- style flags: 256
  291. -- line height: 18
  292. -- part name: About
  293.  
  294.  
  295. -- part 12 (field)
  296. -- low flags: 81
  297. -- high flags: 0002
  298. -- rect: left=3 top=273 right=335 bottom=96
  299. -- title width / last selected line: 0
  300. -- icon id / first selected line: 0 / 0
  301. -- text alignment: 1
  302. -- font id: 3
  303. -- text size: 9
  304. -- style flags: 256
  305. -- line height: 12
  306. -- part name: Make Button
  307.  
  308.  
  309. -- part 13 (button)
  310. -- low flags: 80
  311. -- high flags: A000
  312. -- rect: left=2 top=219 right=268 bottom=71
  313. -- title width / last selected line: 0
  314. -- icon id / first selected line: 1004 / 1004
  315. -- text alignment: 1
  316. -- font id: 0
  317. -- text size: 12
  318. -- style flags: 0
  319. -- line height: 16
  320. -- part name: Script Report
  321. ----- HyperTalk script -----
  322. on mouseUp
  323.   visual effect dissolve to gray
  324.   visual effect dissolve slowly to gray
  325.   visual effect dissolve to card
  326.   go to stack "Script Report"
  327. end mouseUp
  328.  
  329.  
  330.  
  331. -- part 16 (field)
  332. -- low flags: 81
  333. -- high flags: 2002
  334. -- rect: left=73 top=107 right=235 bottom=442
  335. -- title width / last selected line: 0
  336. -- icon id / first selected line: 0 / 0
  337. -- text alignment: 1
  338. -- font id: 3
  339. -- text size: 10
  340. -- style flags: 0
  341. -- line height: 13
  342. -- part name: More
  343.  
  344.  
  345. -- part 21 (field)
  346. -- low flags: 81
  347. -- high flags: 2002
  348. -- rect: left=73 top=107 right=235 bottom=442
  349. -- title width / last selected line: 0
  350. -- icon id / first selected line: 0 / 0
  351. -- text alignment: 1
  352. -- font id: 3
  353. -- text size: 10
  354. -- style flags: 0
  355. -- line height: 13
  356. -- part name: Even More
  357.  
  358.  
  359. -- part 9 (button)
  360. -- low flags: 80
  361. -- high flags: A003
  362. -- rect: left=232 top=207 right=229 bottom=289
  363. -- title width / last selected line: 0
  364. -- icon id / first selected line: 0 / 0
  365. -- text alignment: 1
  366. -- font id: 0
  367. -- text size: 12
  368. -- style flags: 0
  369. -- line height: 16
  370. -- part name: OK
  371. ----- HyperTalk script -----
  372. on mouseUp
  373.   hide button "OK"
  374.   hide card field "Even More"
  375.   show button "About"
  376.   hide card field "Make Button"
  377.   hide button "Script Report"
  378. end mouseUp
  379.  
  380.  
  381.  
  382. -- part 17 (button)
  383. -- low flags: 80
  384. -- high flags: A003
  385. -- rect: left=232 top=208 right=230 bottom=289
  386. -- title width / last selected line: 0
  387. -- icon id / first selected line: 0 / 0
  388. -- text alignment: 1
  389. -- font id: 0
  390. -- text size: 12
  391. -- style flags: 0
  392. -- line height: 16
  393. -- part name: More
  394. ----- HyperTalk script -----
  395. on mouseUp
  396.   hide button "More"
  397.   show card field "More"
  398.   hide card field "About"
  399.   show button "Even more"
  400. end mouseUp
  401.  
  402.  
  403.  
  404. -- part 23 (field)
  405. -- low flags: 01
  406. -- high flags: 0004
  407. -- rect: left=166 top=309 right=335 bottom=348
  408. -- title width / last selected line: 0
  409. -- icon id / first selected line: 0 / 0
  410. -- text alignment: 0
  411. -- font id: 3
  412. -- text size: 12
  413. -- style flags: 0
  414. -- line height: 16
  415. -- part name: Background
  416.  
  417.  
  418. -- part 19 (button)
  419. -- low flags: 00
  420. -- high flags: A005
  421. -- rect: left=171 top=313 right=330 bottom=339
  422. -- title width / last selected line: 0
  423. -- icon id / first selected line: 0 / 0
  424. -- text alignment: 1
  425. -- font id: 0
  426. -- text size: 12
  427. -- style flags: 0
  428. -- line height: 16
  429. -- part name: Watch the cards go by
  430.  
  431.  
  432. -- part 22 (button)
  433. -- low flags: 80
  434. -- high flags: A003
  435. -- rect: left=214 top=208 right=230 bottom=297
  436. -- title width / last selected line: 0
  437. -- icon id / first selected line: 0 / 0
  438. -- text alignment: 1
  439. -- font id: 0
  440. -- text size: 12
  441. -- style flags: 0
  442. -- line height: 16
  443. -- part name: Even More
  444. ----- HyperTalk script -----
  445. on mouseUp
  446.   hide button "Even More"
  447.   show card field "Even More"
  448.   show button "OK"
  449.   hide card field "More"
  450.   show card field "Make Button"
  451.   show button "Script Report"
  452. end mouseUp
  453.  
  454.  
  455.  
  456. -- part contents for card part 4
  457. ----- text -----
  458. Script Report 1.2
  459. by Eric Alderman
  460.  
  461. Script Report will examine any stack and produce a formatted report
  462. (on screen, paper, or disk)
  463. of all scripts in the stack.
  464.  
  465. -- part contents for card part 8
  466. ----- text -----
  467. If you like Script Report,
  468. please send $10.00 (or whatever) to:
  469. Eric Alderman
  470. 48 Shattuck Square, Suite 13
  471. Berkeley, CA 94704
  472.  
  473. -- part contents for card part 12
  474. ----- text -----
  475. Copy this button, and paste it onto your Home stack
  476.  
  477.  
  478. -- part contents for card part 16
  479. ----- text -----
  480. Version 1.1 was sturdier than 1.0, due to the "set lockMessages" command, which suppresses nasty "on openCard" messages and the like.  The "fileName()" XFCN requests the stack name (thanks to Steve
  481. Maller).  The message box shows the progress of Script Report as it processes a stack.
  482.  
  483.  
  484. -- part contents for card part 21
  485. ----- text -----
  486. Version 1.2 allows you to suppress the display of cards as Script Report processes the stack (using "set lockScreen").  This is good for stacks which have a lot of cards without many scripts on them, such as database-style stacks.  Otherwise, the display doesn't really slow things down.  Script Report can now handle a much larger report of scripts.
  487.  
  488. Comments? CompuServe: 72777,525 ‚Äî GEnie: EAlderman.